Take feature namespace into account while building summary (fixes #1286)
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Thu, 5 Apr 2018 14:59:51 +0000 (16:59 +0200)
committerDirkjan Ochtman <dirkjan@ochtman.nl>
Sat, 28 Apr 2018 11:41:18 +0000 (13:41 +0200)
commitcb533ae1bf363606994be75eb533ccc7a542a81a
treedbc72815b3d8a68a97355ca4c3aafac14699fccb
parenta9f163e390377105b7ecf3a29a05f9631f898e3a
Take feature namespace into account while building summary (fixes #1286)

Here's an attempt at a table to cover the different cases:

Feature
    Old (must be in features table)
        Continue
    Namespaced (might be stray value)
        In features table: Check that Crate dependency is in the list
        -> Non-optional dependency: Bail [PREVIOUSLY: bailed for non-optional dependency]
        -> Optional dependency: Insert feature of this name
        -> Else: Bail [PREVIOUSLY: bailed for unknown dependency or feature]

Crate
    Old (might be stray value)
        Non-optional dependency: Bail
        No dependency found: Bail
    Namespaced
        Non-optional dependency: Bail
        No dependency found: Bail

CrateFeature
    Old
        No dependency found: Bail
    Namespaced
        No dependency found: Bail
src/cargo/core/summary.rs
src/cargo/ops/registry.rs